package com.lagou.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author zx
 * @date 2021/5/28 22:11
 * @description
 */
public interface SqlSession {
    // 查询所有
    public <E> List<E> selectList(String statementId,Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InstantiationException, IntrospectionException, InvocationTargetException;

    // 查詢單個
    public <T> T selectOne(String statementId,Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InvocationTargetException, IntrospectionException, InstantiationException;

    // 增删改查调用方法
    public int update(String statementId,Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InvocationTargetException, IntrospectionException, InstantiationException;

    // 生成动态代理类
    public <T> T getMapper(Class<?> tClass);
}
